// 合同状态枚举
export const CONTRACT_STATUS = {
  FAIL: 0,
  AUDIT_PENDING: 1,
  EXEC_PENDING: 2,
  EXECUTING: 3,
  FINISH: 4,
};

export const NormalState = {
  NO: '0',
  YES: '1',
};

export const NORMAL_STATUS = [
  { label: '是', value: NormalState.YES },
  { label: '否', value: NormalState.NO },
];

export const DataScope = {
  // 全部
  ALL: 0,
  // 本级
  OWN_LEVEL: 1,
  // 自定义
  CUSTOM: 2,
};

export const DATA_SCOPES = [
  { label: '全部', value: DataScope.ALL },
  { label: '本级', value: DataScope.OWN_LEVEL },
  { label: '自定义', value: DataScope.CUSTOM },
];

export const CONTRACT_STATUS_OPTIONS = [
  { value: CONTRACT_STATUS.FAIL, label: '审核失败' },
  { value: CONTRACT_STATUS.AUDIT_PENDING, label: '待审核' },
  { value: CONTRACT_STATUS.EXEC_PENDING, label: '待履行' },
  { value: CONTRACT_STATUS.EXECUTING, label: '审核成功' },
  { value: CONTRACT_STATUS.FINISH, label: '已完成' },
];

// 合同类型枚举
export const CONTRACT_TYPES = {
  MAIN: 0,
  SUB: 1,
  SUPPLEMENT: 2,
};

export const CONTRACT_TYPE_OPTIONS = [
  { value: CONTRACT_TYPES.MAIN, label: '主合同' },
  { value: CONTRACT_TYPES.SUB, label: '子合同' },
  { value: CONTRACT_TYPES.SUPPLEMENT, label: '补充合同' },
];

// 合同收付类型枚举
export const CONTRACT_PAYMENT_TYPES = {
  PAYMENT: 0,
  RECEIPT: 1,
};

// 标签类型
type TagTheme = 'default' | 'success' | 'primary' | 'warning' | 'danger';
// 通知的优先级对应的标签类型
export const NOTIFICATION_TYPES: Map<string, TagTheme> = new Map([
  ['low', 'primary'],
  ['middle', 'warning'],
  ['high', 'danger'],
]);

// 通用请求头
export enum ContentTypeEnum {
  Json = 'application/json;charset=UTF-8',
  FormURLEncoded = 'application/x-www-form-urlencoded;charset=UTF-8',
  FormData = 'multipart/form-data;charset=UTF-8',
}

export const OrgType = {
  COMPANY: '1',
  DEPARTMENT: '2',
  GROUP: '3',
  OTHER: '4',
};

export const ORG_TYPES = [
  { label: '公司', value: OrgType.COMPANY },
  { label: '部门', value: OrgType.DEPARTMENT },
  { label: '小组', value: OrgType.GROUP },
  { label: '其他', value: OrgType.OTHER },
];

export const MenuType = {
  MENU: '0',
  BUTTON: '1',
};

export const MENU_TYPES = [
  { label: '菜单', value: MenuType.MENU },
  { label: '按钮', value: MenuType.BUTTON },
];

export const METHOD_OPTIONS = [
  { label: '新增', value: 'POST' },
  { label: '查询', value: 'GET' },
  { label: '修改', value: 'PUT' },
  { label: '删除', value: 'DELETE' },
];

export const LogType = {
  NORMAL: '0',
  ERROR: '9',
};

export const LOG_TYPES = [
  { label: '正常', value: LogType.NORMAL },
  { label: '异常', value: LogType.ERROR },
];
